<include file="./Application/Admin/View/Public/htmlheader.html" />
<include file="./Application/Admin/View/Public/header.html" />
<include file="./Application/Admin/View/Public/left.html" />

<style>
    .pagination{margin:0;}
</style>
<ol class="breadcrumb">
    <li><a href="/Admin/Room/category">直播分类</a></li>
    <li class="active">修改分类</li>
</ol>
<form action="__ROOT__/Admin/Room/modifyCategory" method="post" enctype="multipart/form-data">
    <input type="hidden" name="id" value="{$category.id}">
    <div class="row">
        <div class="col-lg-3 text-right"><span class="red">*</span>图片：</div>
        <div class="col-lg-3">
            <image src="{$category['image']}" height="100" />
            <input type="file" name="image"  class="form-control" />
        </div>
    </div>
    <br />
    <div class="row">
        <div class="col-lg-3 text-right"><span class="red">*</span>所属分类：</div>
        <div class="col-lg-3">
            <select class="form-control" id="parentsCateogry" name="categoryId">
                <option value="0">顶级分类</option>
                <foreach name="parentsCategoryList" item="vo">
                    <if condition="$vo['id'] neq $category['id']">
                        <option value="{$vo.id}">{$vo.name}</option>
                    </if>
                </foreach>
            </select>
        </div>
    </div>
    <br />
    <div class="row">
        <div class="col-lg-3 text-right"><span class="red">*</span>名称：</div>
        <div class="col-lg-3"><input type="text" name="name" value="{$category['name']}" class="form-control" /></div>
    </div>
    <br />
    <div class="row">
        <div class="col-lg-3 text-right"><span class="red">*</span>当前状态：</div>
        <div class="col-lg-3">
            <select class="form-control" id="status" name="status">
                    <option value="0">禁用</option>
                    <option value="1">启用</option>
            </select>
        </div>
    </div>

    <input type="hidden" name="userName" value="{$userInfo['username']}">
    <br />
    <div class="row">
        <div class="col-lg-3"></div>
        <div class="col-lg-3"><button type="submit" class="btn btn-primary">确定</button></div>
    </div>
</form>
<script>
    $("#status").val("{$category['status']}");
    $("#parentsCateogry").val("{$category['categoryId']}");
</script>
<include file="./Application/Admin/View/Public/footer.html" />